<template>
  <section class="page-container">
    <el-divider content-position="left">
      v-copy
    </el-divider>
    <el-input
      v-model="textAreaData"
      type="textarea"
      :rows="2"
      :autosize="{ minRows: 2, maxRows: 3 }"
      placeholder="输入内容，点击复制试试"
    />
    <section class="button-wrap">
      <el-button
        v-copy="textAreaData"
        type="primary"
      >
        复 制
      </el-button>
    </section>
  </section>
</template>

<script lang="ts" setup name="directives-index">
import { ref } from 'vue';

const textAreaData = ref('');
</script>

<style lang="scss" scoped>
  .button-wrap {
    margin-top: 12px;
    text-align: right;
  }
</style>
